v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Get Points Balance

Retrieves points balance of a customer from a single program or all programs of the org. Points are aggregated for each Point Category - Main, delayed accrual, and external trigger based.

This is a light API.

get/customers/{user id}/points/balance

Path parameters

userIdinteger required

Unique ID of the customer whose points balance needs to be fetched.

Query parameters

programIdinteger

Unique ID of the loyalty program from which points balance needs to retrieve. If not passed, it shows the points balance in the default program.

entityType'CUSTOMER' | 'FLEET'

Pass CUSTOMER to fetch the individual customer’s points balance, FLEET to see group-level details. Default value is CUSTOMER.

fetchDataForAllProgramsboolean

Pass true to fetch the sum of points balance from all the available programs of the org. Default value is false.

Headers

X-CAP-API-OAUTH-TOKENstring

Response

200

entityIdinteger
entityTypestring
totalPointsnumber
mainPointsnumber
promisedPointsinteger

Example response

{
  "entityId": 98662653,
  "entityType": "CUSTOMER",
  "totalPoints": 23682.3,
  "mainPoints": 23682.3
}